package com.macro.mall.portal.service.impl;

import com.macro.mall.mapper.OmsOrderReturnApplyMapper;
import com.macro.mall.model.OmsOrderReturnApply;
import com.macro.mall.portal.domain.OmsOrderReturnApplyParam;
import com.macro.mall.portal.service.OmsPortalOrderReturnApplyService;
import java.util.Date;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/** 订单退货管理Service实现类 Created by macro on 2018/10/17. */
@Service
public class OmsPortalOrderReturnApplyServiceImpl implements OmsPortalOrderReturnApplyService {
  @Autowired private OmsOrderReturnApplyMapper returnApplyMapper;

  @Override
  public int create(OmsOrderReturnApplyParam returnApply) {
    OmsOrderReturnApply realApply = new OmsOrderReturnApply();
    BeanUtils.copyProperties(returnApply, realApply);
    realApply.setCreateTime(new Date());
    realApply.setStatus(0);
    return returnApplyMapper.insert(realApply);
  }
}
